glo dir "C:\Users\03638881\Documents\development\satellite\"
cd ${dir}
adopath + ${dir}
cap prog drop mclogit
cap prog drop mclogit_lf
cap prog drop mclogit_p
cap prog drop mcre
cap prog drop mcre_lf
cap prog drop mcre_p
cap prog drop MESim


qui {

	*** Parameters fixed across designs ***
	glo beta1  -3
	glo beta2 -0.1
	glo beta3  -2
	glo nobs 2000
	glo T 15
	glo reps 400
	glo alpha 1
	
	*** Parameters varying across designs ***
	loc beta0s		"3.5 0 -3.5"
	loc theta0s		"-1.5 -0.5"
	loc theta1s		"-2.5 -1.3"
	 
	glo dgp = 0 
	foreach b in `beta0s' {
		glo beta0 = `b' 
		foreach fp in `theta0s' {
			glo theta0 = `fp' 
			foreach fn in `theta1s' {
				glo theta1 = `fn' 
					glo dgp = ${dgp} + 1
					noi di "*** DGP ${dgp} ***"
					noi di "b0 = " ${beta0} "; theta0 = " ${theta0} "; theta1 = " ${theta1} 
					noi di "$S_TIME  $S_DATE"
					glo seed = 3456659
					do "MeasurementErrorBinarySims.do" 
				}
			}
		}
	}

	do "MeasurementErrorBinaryFormat.do"
}

